# 装饰器

def func1():
    print("i am a boy")

def outer(func):
    def inner():
        print("***************")
        func()
    return inner

f = outer(func1)
f()


def say(age):
    print("the boy %d years old" %(age))


def outer1(say):
    def inner1(age):
        if age < 0:
            age = 0
            say(age)
    return inner1

f1 = outer1(say)
f1(-2)

